
<%@page import="comm.util.CommUtil"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="comm.util.SoptHashMap"%>
<%@page import="styledaco.board.BoardProc"%><%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%

BoardProc board = new BoardProc();
SoptHashMap hm = RequestManager.getRequest(request);
System.out.println("#######################");
System.out.println(hm.toString());
String curCategory = CommUtil.NVL(hm.get("CATEGORY_SEQ"),"");
String curTarget = CommUtil.NVL(hm.get("CURMENU"),"");
String result = "";
System.out.println(hm.get("ACTIONTYPE"));
if(hm.get("ACTIONTYPE")!=null && hm.get("ACTIONTYPE").toString().equals("updateBoard")){
	result = board.updateBoard(request);
}else if(hm.get("ACTIONTYPE")!=null && hm.get("ACTIONTYPE").toString().equals("deleteBoard")){
	result = board.deleteBoard(request);
}else{
	result = board.regBoard(request);
	
	//글저장 성공적이고, 물품 등록일 경우
	if(result.length()>0 && hm.get("GOODS_SEQ")!=null && hm.get("GOODS_SEQ").toString().length()>0){
		AuctionProc auction = new AuctionProc();
		auction.updateGoodsAddToBoard(result,CommUtil.NVL(hm.get("GOODS_SEQ"),""));
	}
}
%>


<%@page import="styledaco.auction.AuctionProc"%><script type="text/javascript">
	window.parent.afterWriteComplete('<%=curCategory%>','<%=result%>','<%=curTarget%>');
</script>